Repository navigation
Conversation
Staging kept every invocation log and traced every request. At ~150k requests/day that was ~4 GB/day (~125 GB/month), as much as production, and the "~5 GB/month" in wrangler.toml and ADR-015 was wrong. From Dec 1, Workers Observability bills ingestion at $0.25/GB past 50 GB, so it is about $30/month. Turn invocation logs off, as in production, and sample traces at 10%. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Staging's observability now matches production's log setting, and its traces are sampled at 10%:
logs.invocation_logstruefalsetraces.head_sampling_rate10.1Everything else is unchanged: all
WARN/ERRORlines are kept, query strings are redacted, and Issues stays off (the M1 alert is account-wide, ADR-015).Why
Staging serves about 150k requests a day, but its telemetry was about 4 GB/day (about 125 GB/month), as much as production. Measured with the Workers Observability usage API over Nov 15–19, after v2.5.2 deployed:
The comment in
wrangler.tomland ADR-015 both said staging was about 5 GB/month. That was off by a factor of about 25.From Dec 1, Workers Observability bills ingestion at $0.25/GB past 50 GB a month, shared across the account. Staging's extra volume is about $30/month.
Expected result
This is an estimate from the figures above. I haven't measured staging after the change.
Why 10% for traces, not production's 1%
At about 150k requests a day, 1% leaves about 1.5k traces a day, too few to find a particular staging request. 10% costs about $1/month more than 1% and leaves enough to debug with.
Not changed
PR previews (
wrangler.preview.toml) still use full sampling and invocation logs. They're idle today and cost almost nothing, but a busy preview (a load test, say) would add up.Checks
wrangler.tomlparses, and the resolvedenv.staging.observabilityvalues are the ones above.cargo fmt, wasm clippy and check, andcargo test.🤖 Generated with Claude Code